/*
	This file is part of PropExtractor.

	AliceDecrypt is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	AliceDecrypt is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with PropExtractor. If not, see <http://www.gnu.org/licenses/>.
*/

#include "PEImage.h"

#include "PETools.h"

namespace pe
{

	int PEImageRawSaveToTGA(PEImageRaw* a_Data, const char* a_FilePath)
	{
		char filename[_MAX_PATH];
		strcpy(filename, a_FilePath);
		strcat(filename, ".tga");

		CheckDirectory(a_FilePath);

		WriteTGA(filename, a_Data->width, a_Data->height, a_Data->data);

		return 0;
	}

}; // namespace pe